const mongoose = require('mongoose')
const { preSave } = require('../utils')

const ForgetPasswordSchema = new mongoose.Schema({
    account: String,
    // 1——待处理
    // 2——已重置
    // 3——忽略
    status: Number,
    meta: {
        createAt: {
            type: Number,
            default: (new Date()).getTime(),
        },
        updateAt: {
            type: Number,
            default: (new Date()).getTime(),
        },
    },
})

ForgetPasswordSchema.pre('save', preSave)

module.exports = ForgetPasswordSchema
